import { Component, OnInit } from '@angular/core';
import { AuthService } from '../../../@core/services/auth.service';
import { Router } from '@angular/router';

@Component({
  selector: 'app-header',
  templateUrl: './header.component.html',
  styleUrls: ['./header.component.scss'],
})
export class HeaderComponent implements OnInit {
  constructor(private route: Router, private authService: AuthService) {}

  ngOnInit() {}

  //
  private onLogOut() {
    this.authService.logout();
    this.route.navigate(['/', 'login']);
  }
}
